package com.weblog.web.controller;

import com.weblog.common.Response;
import com.weblog.web.model.vo.user.RegisterParam;
import com.weblog.web.service.UserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/user")
public class UserController {
    @Resource
    private UserService userService;

    @PostMapping("/register")
    public Response<String> register(@RequestBody RegisterParam registerParam) {
        userService.register(registerParam);
        return Response.success();
    }
}
